package com.hd.pojo;

import org.springframework.format.annotation.DateTimeFormat;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by lenovo on 2017/11/21.
 */
public class Reservation {
    //预约表
    private Integer reservationId;
    private String reservationName;                  //预约者姓名
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date reservationStart;                   //预约开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date reservationEnd;                     //预约结束时间
    private String reservationNo;                     //预约号
    private Integer reservationState;                    //预约状态
    private String reservationMobile;                //预约者电话
    private String reservaionSex;                    //预约者性别
    private Integer reservationItme;                    //预约条目
    private Integer userId;                              //当前登陆人
    private String medicalRecordNo;                  //医疗记录编号
    private String membershipCardNo;                 //会员卡号
    private double registryFee;                      //注册费用
    private Date createTime;                          //创建时间
    private Date updateTime;                          //更新时间
    private String memo;                               //备忘录
    private Integer operUserID;                           //预约医生编号

    private String reservationDate;

    public String getReservationDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        String start = sdf.format(getReservationStart());
        start = start.substring(start.length()-8,start.length()-3);
        String end = sdf.format(getReservationEnd());
        end = end.substring(end.length()-8,end.length()-3);
        return start+" 至 "+end;
    }

    public void setReservationDate(String reservationDate) {
        this.reservationDate = reservationDate;
    }

    public Integer getReservationId() {
        return reservationId;
    }

    public void setReservationId(Integer reservationId) {
        this.reservationId = reservationId;
    }

    public String getReservationName() {
        return reservationName;
    }

    public void setReservationName(String reservationName) {
        this.reservationName = reservationName;
    }

    public Date getReservationStart() {
        return reservationStart;
    }

    public void setReservationStart(Date reservationStart) {
        this.reservationStart = reservationStart;
    }

    public Date getReservationEnd() {
        return reservationEnd;
    }

    public void setReservationEnd(Date reservationEnd) {
        this.reservationEnd = reservationEnd;
    }

    public String getReservationNo() {
        return reservationNo;
    }

    public void setReservationNo(String reservationNo) {
        this.reservationNo = reservationNo;
    }

    public Integer getReservationState() {
        return reservationState;
    }

    public void setReservationState(Integer reservationState) {
        this.reservationState = reservationState;
    }

    public String getReservationMobile() {
        return reservationMobile;
    }

    public void setReservationMobile(String reservationMobile) {
        this.reservationMobile = reservationMobile;
    }

    public String getReservaionSex() {
        return reservaionSex;
    }

    public void setReservaionSex(String reservaionSex) {
        this.reservaionSex = reservaionSex;
    }

    public Integer getReservationItme() {
        return reservationItme;
    }

    public void setReservationItme(Integer reservationItme) {
        this.reservationItme = reservationItme;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getMedicalRecordNo() {
        return medicalRecordNo;
    }

    public void setMedicalRecordNo(String medicalRecordNo) {
        this.medicalRecordNo = medicalRecordNo;
    }

    public String getMembershipCardNo() {
        return membershipCardNo;
    }

    public void setMembershipCardNo(String membershipCardNo) {
        this.membershipCardNo = membershipCardNo;
    }

    public double getRegistryFee() {
        return registryFee;
    }

    public void setRegistryFee(double registryFee) {
        this.registryFee = registryFee;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Integer getOperUserID() {
        return operUserID;
    }

    public void setOperUserID(Integer operUserID) {
        this.operUserID = operUserID;
    }
}
